using System;
using System.Windows.Input;

namespace FluentSilverlight.Expressions
{
    public class CursorExpression<TParentPart>
    {
        private readonly TParentPart parentPart;
        private readonly Action<Cursor> setValue;

        public CursorExpression(TParentPart parentPart, Action<Cursor> setValue)
        {
            this.parentPart = parentPart;
            this.setValue = setValue;
        }

        public TParentPart Arrow()
        {
            setValue(Cursors.Arrow);
            return parentPart;
        }

        public TParentPart Eraser()
        {
            setValue(Cursors.Eraser);
            return parentPart;
        }

        public TParentPart Hand()
        {
            setValue(Cursors.Hand);
            return parentPart;
        }

        public TParentPart IBeam()
        {
            setValue(Cursors.IBeam);
            return parentPart;
        }

        public TParentPart None()
        {
            setValue(Cursors.None);
            return parentPart;
        }

        public TParentPart SizeNS()
        {
            setValue(Cursors.SizeNS);
            return parentPart;
        }

        public TParentPart SizeWE()
        {
            setValue(Cursors.SizeWE);
            return parentPart;
        }

        public TParentPart Stylus()
        {
            setValue(Cursors.Stylus);
            return parentPart;
        }

        public TParentPart Wait()
        {
            setValue(Cursors.Wait);
            return parentPart;
        }
    }
}